<?php
/**
 * Created by PhpStorm.
 * User: moon
 * Date: 2021/6/8
 * Time: 21:04
 */

namespace app\admin\model;

use app\BaseModel;

class Users extends BaseModel
{
    protected $table = 'sh_user';

    public $rule = [
        'userTel' => 'requireWithout:email|mobile',
        'email' => 'requireWithout:userTel|email',
        'userName|昵称' => 'require',
        'balance|余额' => '>=:0',
        'isBlack' => 'in:1,2',
        'sex' => 'require|in:1,2,3'
    ];
    public $message = [
        'userTel.requireWithout' => '手机号或邮箱必须填写一项',
        'userTel.mobile' => '手机号格式错误',
        'email.requireWithout' => '手机号或邮箱必须填写一项',
        'email.email' => '邮箱格式错误',
        'isBlack' => '状态异常',
        'sex.require' => '请选择性别',
        'sex.in' => '性别选择异常',
    ];
}
